package ink.yql.model;

import java.io.Serializable;

/**
 * @author YQL
 * 点赞/嘘
 */
public class Point implements Serializable {
    /**
     *   目标id
     */
    private Integer puid;
    /**
     *   状态  0留言 1动态 2.项目'
     */
    private Integer pstatus;
    /**
     * 用户id
     */
    private Integer uid;
    /**
     *  0点赞 1点嘘
     */
    private Integer ptype;

    public Point(Integer puid, Integer pstatus, Integer uid, Integer ptype) {
        this.puid = puid;
        this.pstatus = pstatus;
        this.uid = uid;
        this.ptype = ptype;
    }

    public Point() {
    }

    public static PointBuilder builder() {
        return new PointBuilder();
    }

    public Integer getPuid() {
        return this.puid;
    }

    public Integer getPstatus() {
        return this.pstatus;
    }

    public Integer getUid() {
        return this.uid;
    }

    public Integer getPtype() {
        return this.ptype;
    }

    public void setPuid(Integer puid) {
        this.puid = puid;
    }

    public void setPstatus(Integer pstatus) {
        this.pstatus = pstatus;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public void setPtype(Integer ptype) {
        this.ptype = ptype;
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof Point)) return false;
        final Point other = (Point) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$puid = this.getPuid();
        final Object other$puid = other.getPuid();
        if (this$puid == null ? other$puid != null : !this$puid.equals(other$puid)) return false;
        final Object this$pstatus = this.getPstatus();
        final Object other$pstatus = other.getPstatus();
        if (this$pstatus == null ? other$pstatus != null : !this$pstatus.equals(other$pstatus)) return false;
        final Object this$uid = this.getUid();
        final Object other$uid = other.getUid();
        if (this$uid == null ? other$uid != null : !this$uid.equals(other$uid)) return false;
        final Object this$ptype = this.getPtype();
        final Object other$ptype = other.getPtype();
        if (this$ptype == null ? other$ptype != null : !this$ptype.equals(other$ptype)) return false;
        return true;
    }

    protected boolean canEqual(final Object other) {
        return other instanceof Point;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $puid = this.getPuid();
        result = result * PRIME + ($puid == null ? 43 : $puid.hashCode());
        final Object $pstatus = this.getPstatus();
        result = result * PRIME + ($pstatus == null ? 43 : $pstatus.hashCode());
        final Object $uid = this.getUid();
        result = result * PRIME + ($uid == null ? 43 : $uid.hashCode());
        final Object $ptype = this.getPtype();
        result = result * PRIME + ($ptype == null ? 43 : $ptype.hashCode());
        return result;
    }

    public String toString() {
        return "Point(puid=" + this.getPuid() + ", pstatus=" + this.getPstatus() + ", uid=" + this.getUid() + ", ptype=" + this.getPtype() + ")";
    }

    public static class PointBuilder {
        private Integer puid;
        private Integer pstatus;
        private Integer uid;
        private Integer ptype;

        PointBuilder() {
        }

        public Point.PointBuilder puid(Integer puid) {
            this.puid = puid;
            return this;
        }

        public Point.PointBuilder pstatus(Integer pstatus) {
            this.pstatus = pstatus;
            return this;
        }

        public Point.PointBuilder uid(Integer uid) {
            this.uid = uid;
            return this;
        }

        public Point.PointBuilder ptype(Integer ptype) {
            this.ptype = ptype;
            return this;
        }

        public Point build() {
            return new Point(puid, pstatus, uid, ptype);
        }

        public String toString() {
            return "Point.PointBuilder(puid=" + this.puid + ", pstatus=" + this.pstatus + ", uid=" + this.uid + ", ptype=" + this.ptype + ")";
        }
    }
}
